﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="AddUpdateSupport.aspx.cs" Inherits="AddUpdateSupport" Title="Thêm/Sửa Hỗ Trợ" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    
    <script type="text/javascript" src="AdminTools/ckfinder/ckfinder.js"></script>
	<script type="text/javascript">

    function BrowseServer()
    {
	    // You can use the "CKFinder" class to render CKFinder in a page:
	    var finder = new CKFinder();
	    finder.basePath = "AdminTools/ckfinder";	// The path for the installation of CKFinder (default = "/ckfinder/").
	    finder.selectActionFunction = SetFileField;
	    finder.popup();

	    // It can also be done in a single line, calling the "static"
	    // popup( basePath, width, height, selectFunction ) function:
	    // CKFinder.popup( '../', null, null, SetFileField ) ;
	    //
	    // The "popup" function can also accept an object as the only argument.
	    // CKFinder.popup( { basePath : '../', selectActionFunction : SetFileField } ) ;
    }

    // This is a sample function which is called when a file is selected in CKFinder.
    function SetFileField( fileUrl )
    {	    
        document.getElementById( 'ctl00_ContentPlaceHolder1_imgNews' ).src = fileUrl;     
        document.getElementById( 'ctl00_ContentPlaceHolder1_hfImage' ).value = fileUrl;             
    }

	</script>
    
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

    <div id="toolbar_box">
                    <div class="t">
                        <div class="t">
                            <div class="t"></div>
                        </div>
                    </div>
                    
                    <div class="m">
                        <div id="toolbar" class="toolbar">
                            <table class="toolbar">
                                <tr>
                                    <td id="toolbar_delete" class="button">
                                        <%--<a href="#" class="toolbar">
                                            <span class="icon-32-delete"></span>
                                        Xóa</a>--%>
                                        <asp:LinkButton runat="server" ID="lbtSave" onclick="lbtSave_Click" ValidationGroup="SupportInfo">
                                            <span class="icon-32-save"></span>
                                            Lưu
                                        </asp:LinkButton>
                                    </td>
                                    <%--<td id="toolbar_update" class="button"><a href="#" class="toolbar"><span class="icon-32-edit"></span>Sửa</a></td>--%>
                                    <td id="toolbar_add" class="button"><a href="SupportManager.aspx" class="toolbar"><span class="icon-32-cancel"></span>Bỏ qua</a></td>
                                    <td id="toolbar_help" class="button"><a href="#" class="toolbar"><span class="icon-32-help"></span>Trợ giúp</a></td>
                                </tr>
                            </table>
                        </div>
                        <div class="header addupdate">
                            Thêm/Sửa Hỗ Trợ
                        </div>
                        <div class="clr"></div>
                    </div>
                    
                    <div class="b">
                        <div class="b">
                            <div class="b"></div>
                        </div>
                    </div>
    </div><!--End toolbar_box--------------------------------------------------->

    
    <div id="element-box">
                    <div class="t">
                        <div class="t">
                            <div class="t"></div>
                        </div>
                    </div>
                    
                    <div class="m">                        
                        <div class="divAddUpProduct" style="width:1000px">
                            <fieldset class="adminlist">
                                <legend>Chi tiết</legend>
                                <table class="admintable" width="100%">
                                    <tbody>                                          
                                        <tr>
                                            <td class="key">Tên :</td>
                                            <td>
                                                <asp:TextBox runat="server" ID="txtName" Width="200px"></asp:TextBox>
                                                <asp:RequiredFieldValidator runat="server" ID="vlName" ControlToValidate="txtName"
                                                Text="*" ValidationGroup="SupportInfo"></asp:RequiredFieldValidator>
                                            </td>
                                        </tr>
                                        
                                        <tr>
                                            <td class="key">Chọn ảnh :</td>
                                            <td>                           
                                                <table>
                                                    <tr>
                                                        <td>                                                            
                                                            <asp:HiddenField runat="server" ID="hfImage"/>                                                            
                                                            <img runat="server" id="imgNews" src="~/App_Themes/Images/toolbar/News.jpg" style="width:100px; height:100px; border:1px solid silver; padding:2px;"/>
                                                        </td>
                                                        <td style="vertical-align:bottom">
                                                            <input type="button" value="Duyệt Ảnh" onclick="BrowseServer();" />
                                                        </td>
                                                    </tr>                                                    
                                                </table>                                                                                                                     
                                            </td>                                            
                                        </tr>    
                                        
                                        <tr>
                                            <td class="key">Url :</td>
                                            <td>
                                                <asp:TextBox runat="server" ID="txtUrl" Width="700px"></asp:TextBox>                                                
                                            </td>
                                        </tr>
                                        
                                        <tr>
                                            <td class="key">Mobile :</td>
                                            <td>
                                                <asp:TextBox runat="server" ID="txtMobile" Width="200px"></asp:TextBox>                                                
                                            </td>
                                        </tr>
                                                                                                                        
                                        <tr>
                                            <td class="key">Tình trạng :</td>
                                            <td>
                                                <asp:RadioButtonList runat="server" ID="rdlRecordStatus" RepeatDirection="Horizontal">
                                                </asp:RadioButtonList>
                                            </td>
                                        </tr>                                                                                
                                        
                                        <tr>
                                            <td class="key">Thứ tự :</td>
                                            <td>                                                
                                                <asp:TextBox runat="server" ID="txtSorted" Width="200px"></asp:TextBox>
                                                <asp:RequiredFieldValidator runat="server" ID="vlOrder01" ControlToValidate="txtSorted" Text="*" ValidationGroup="NewsInfo" Display="Dynamic"></asp:RequiredFieldValidator>
                                                <asp:RangeValidator runat="server" ID="vlOrder" ControlToValidate="txtSorted" 
                                                    Text="*" ValidationGroup="NewsInfo" MaximumValue="9999" MinimumValue="1" Type="Integer" Display="Dynamic"></asp:RangeValidator>
                                            </td>
                                        </tr>
                                        
                                    </tbody>
                                </table>
                            </fieldset>
                        </div><!--End divAddUpProduct--------------------------------------------------->
                    </div>
                    
                    <div class="b">
                        <div class="b">
                            <div class="b"></div>
                        </div>
                    </div>
    </div><!--End element-box--------------------------------------------------->

</asp:Content>

